package com.yhsimon.observer.improve;

/**
 * @author： YHSimon
 * @date： 2021-10-18 21:20
 */
public class Client {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        CurrentConditions currentConditions = new CurrentConditions();
        BaiduSite baiduSite = new BaiduSite();
        weatherData.registerObserver(baiduSite);
        weatherData.registerObserver(currentConditions);
        //测试
        System.out.println("通知各个注册的观察者");
        weatherData.setData(10, 160, 63);
        weatherData.notifyObservers();


    }
}
